<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
<ui:composition template="/templates/template.xhtml">
    <ui:define name="pageTitle">
        Login
    </ui:define>
    <ui:define name="menu">
        <p:menubar autoSubmenuDisplay="true">
            <p:menuitem value="Login" url="/login.jsf"/>
        </p:menubar>
    </ui:define>
    <ui:define name="body">
       <p:panel header="Login" styleClass="centerPanel">
            <h:messages errorClass="error"/>
            <h:panelGrid columns="2" cellpadding="3" columnClasses="label, value">
                <h:outputLabel value="UserName"/>
                <p:inputText value="#{userBean.userName}" size="20" required="true" label="UserName"/>
                <h:outputLabel value="Password"/>
                <p:password minLength="6" feedback="Hello" value="#{userBean.password}"/>
            </h:panelGrid>

            <div id="toolbar">
                <p:commandButton value="Login" action="#{userBean.login}" ajax="false"/>
                <p:commandButton value="Cancel"/>
            </div>

        </p:panel>


    </ui:define>
</ui:composition>
</html>